﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using KipmeService;

public partial class SiteMaster : System.Web.UI.MasterPage
{
    protected void Page_Load(object sender, EventArgs e)
    {
        MainServiceClient service = Application["KipmeWebservice"] as MainServiceClient;
        category[] categories = service.getCategoryList();
        List<MenuItem> _MenuItems = new List<MenuItem>();

        foreach (category item in categories)
        {
            _MenuItems.Add(new MenuItem(String.Format("\u2022\t{0}",item.categoryCode), item.name, String.Format("Items.aspx?cat={0}", item.categoryCode)));
        }

        NavigationMenuLeftRepeater.DataSource = _MenuItems;
        NavigationMenuLeftRepeater.DataBind();
    }
}
